home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / commercial / inovatronics / edgedemo / edgeeditor / rexx / menu_winstovert.edge < prev    next >
Text File  |  1994-11-17  |  1KB  |  65 lines

  1. /*
  2. ** $VER: Menu_WinsToVert.edge 1.0 (Friday 22-Oct-93 12:55:22)
  3. **
  4. ** Display all windows, vertically panel-ed
  5. **
  6. ** Written by Thomas liljetoft & Inovatronics
  7. */
  8.  
  9. options results
  10.  
  11. /* get some general info*/
  12. firstname = address()
  13. getenvvar _ge_errlevel
  14. errlevel = result
  15. getenvvar _ge_realscreenheight
  16. sh = result
  17. getenvvar _ge_realscreenwidth
  18. sw = result
  19. getenvvar _ge_barheight
  20. bar = result
  21. getenvvar _ge_windows
  22. win_cnt = result
  23.  
  24. /* now actually loop thru the windows and do our thing */
  25. work_cnt = 0
  26. do forever
  27.  
  28.     work_cnt = work_cnt + 1
  29.     
  30.     'window'
  31.     parse var result 'X ' wx ', Y ' wy ', W ' ww ', H ' wh ', ' wrexx ', ' wStatus
  32.  
  33.     /* if unzoomed then zoom it baby */
  34.     if wStatus = "UnZoomed" then 'Window' Zoom
  35.  
  36.     /* do actual work */
  37.     Call DoTheWindow
  38.     
  39.     /* on to the next one, if there is one */
  40.     'addressof nextwindow'
  41.     newname = result
  42.     address value newname
  43.     if newname == firstname then do
  44.         'window front'
  45.         leave
  46.     end
  47. end
  48.  
  49. exit(0)
  50.  
  51. DoTheWindow:
  52.     /* what is the new size of the window */
  53.     w=(sw/win_cnt)%1
  54.     l=((work_cnt-1)*w)%1
  55.     
  56.     /* adjust the window then */
  57.     'changewindow leftedge' l 'topedge' bar 'width' w 'height' sh-bar
  58.     
  59.     /* if an error occurred then report it if we need to */
  60.     if rc >= errlevel then do
  61.         'fault'
  62.         'requestnotify "'result'"'
  63.     end
  64. return
  65.